/**
 * main
 
func main() {
	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).Distinct().Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).ElementAt(5).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).First().Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).IgnoreElements().Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).Last().Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).Skip(2).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).SkipLast(2).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).Take(4).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()
	
	RxGo.Just(1, 2, 3, 4, 5, 6, 7, 8, 9).TakeLast(4).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	observableP := make(chan interface{})
	go func() {
		RxGo.Just(1, 2, 3, 4, 5).Map(func(x int) int {
			switch x {
			case 1:
				time.Sleep(3 * time.Millisecond)
			case 2:
				time.Sleep(1 * time.Millisecond)
			case 3:
				time.Sleep(2 * time.Millisecond)
			case 4:
				time.Sleep(2 * time.Millisecond)
			default:
				time.Sleep(1 * time.Millisecond)
			}
			return x
		}).Subscribe(func(x int) {
			observableP <- x
		})
	}()
	RxGo.Just(1, 2, 3, 4, 5).Map(func(x int) int {
		time.Sleep(2*time.Millisecond)
		return x
	}).Sample(observableP).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(0, 1, 3, 5).Map(func(x int) int {
		switch x {
		case 0:
			time.Sleep(0 * time.Millisecond)
		case 1:
			time.Sleep(1 * time.Millisecond)
		case 3:
			time.Sleep(2 * time.Millisecond)
		case 5:
			time.Sleep(3 * time.Millisecond)
		default:
			time.Sleep(1 * time.Millisecond)
		}
		return x
	}).Debounce(2 * time.Millisecond).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

}

 */
